//
//  PLDatePicker.h
//
//  Created by KimmanYip on 2018/12/21.

/*
 * 时间选择器
 * 转化为年月日
 */

#import <UIKit/UIKit.h>

@interface PLDatePicker : UIView

// 默认格式为yyyy-MM-dd
- (instancetype)initWithCompletion:(void(^)(NSString *dateString))completion;

- (instancetype)initWithMinDate:(NSDate *)minDate maxDate:(NSDate *)maxDate completion:(void(^)(NSString *dateString))completion;

- (instancetype)initWithFormatter:(NSString *)formatter completion:(void(^)(NSString *dateString))completion;

- (instancetype)initWithFormatter:(NSString *)formatter mode:(UIDatePickerMode)mode defaultDate:(NSDate *)defaultDate completion:(void(^)(NSString *dateString))completion;

- (void)show;

@end

